import request from '@/utils/request'

export function login(data) {
  return request({
    url: process.env.VUE_APP_SSO_BASE_URL + '/app/login',
    method: 'post',
    data: data
  })
}

export function getInfo(token) {
  return request({
    url: '/risk-manage-web/admin/infoNew',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: process.env.VUE_APP_SSO_BASE_URL + '/app/logout',
    method: 'post'
  })
}
// 由临时token获取正式得token
export function getTokenByTempToken(data) {
  return request({
    url: process.env.VUE_APP_SSO_BASE_URL + '/app/getToken',
    method: 'post',
    data
  })
}

// 由正式得token获取临时得token
export function getTempTokenByToken(data) {
  return request({
    url: process.env.VUE_APP_SSO_BASE_URL + '/app/getTempToken',
    method: 'post',
    data
  })
}
